package com;

import java.util.Scanner;

public class LoginPage {

	static String name;
	static String pwd;
	static boolean isLogin = false; // 标识是否注册;
	static int i = 2;
	public static void login() {
		System.out.println("[会员系统>>登陆]");
		System.out.println("请输入用户名：");
		Scanner input_name = new Scanner(System.in);
		name = input_name.nextLine();

		System.out.println("请输入密码：");
		Scanner input_pwd = new Scanner(System.in);
		pwd = input_pwd.nextLine();
		
		System.out.println(SqlExe.sqlQuery(3));
		boolean c;
		c = JDBC.logJDBC();
		if (c == true) {
			System.out.println("**********************************");
			System.out.println("\t欢迎" + name + "登陆系统!");
			System.out.println("**********************************");
			System.out.println("你的会员卡号是：" + JDBC.getCard());
			Temp.pubInput(2);
		} else {
			if (i > 0) {
				System.out.println("账号密码错误，剩余" + i + "次！");
				System.out.println( i );
				i--;
				login();
			}else if(i == 0) {
				System.out.println("请10分钟后重试");
			}
		}
	}
}

